using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace LeadTracker.Entities
{
	public class EditorCollection : KeyedCollection<int, Editor>
	{
		public EditorCollection() { }

		public EditorCollection(IEqualityComparer<int> comparer) : base(comparer) { }

		public EditorCollection(IEqualityComparer<int> comparer, int dictionaryCreationThreshold) 
			: base(comparer, dictionaryCreationThreshold) { }

		public EditorCollection(IEnumerable<IDictionary<string, object>> table)
		{
			foreach (var item in table)
				Add(new Editor(item));
		}

		protected override int GetKeyForItem(Editor item)
		{
			return item.EditorKey;
		}

	}
}
